<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="/admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/admin/js/jquery.js"></script>
<link rel="stylesheet" href="/admin/css/default.css" />
<script charset="utf-8" src="/admin/js/kindeditor-min.js"></script>
<script charset="utf-8" src="/admin/js/zh_CN.js"></script>
<script type="text/javascript" src="/admin/js/Validform_v5.3.2_min.js"></script>

<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>

<script type="text/javascript">
	$(function() {
		//表单验证
		$(".newsform").Validform({
			tiptype:3
		});
	});
	KindEditor.ready(function(K) {
		editor1 = K.create('textarea[name="n_info"]', {
		resizeType : 1,
		allowPreviewEmoticons : false,
		allowImageUpload : false,
		uploadJson : '<{$adminpage}>?m=upload',
		fileManagerJson : '<{$adminpage}>?m=upload_manager',
		allowFileManager : true,
		items : [
				'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
				'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
				'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
				'anchor', 'link', 'unlink', '|', 'about']
		});
	});
	KindEditor.ready(function(K) {
		var editor = K.editor({
			uploadJson : '<{$adminpage}>?m=upload',
			fileManagerJson : '<{$adminpage}>?m=upload_manager',
			allowFileManager : true,
		});
		K('#image1').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#url1').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#url1').val(url);
						editor.hideDialog();
					}
				});
			});
		});
	});
</script>
</head>
<body>
<div class="colorarea01">
	<div class="search clearfix">
		<div class="searchL">
			<ul class="menulist">
				<li><a href="{{url('new/newslist')}}" class="list">返回新闻列表</a></li>
			</ul>
		</div>
	</div>
	<form name="form" class="newsform" method="post" enctype="multipart/form-data" action="">
	{!!csrf_field()!!}
		<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
			<tr>
				<th>分类：</th>
				<td>
					<select name="catid" id="">
					@foreach($catelist as $c)
						<option value="{{$c->catid}}">{{$c->catname}}</option>
						@endforeach
					</select>
				</td>
			</tr>
			<tr>
				<th>标题：</th>
				<td><input name="n_title" type="text" size="80" value=""/></td>
			</tr>
				<tr>
				<th>关键字：</th>
				<td><input name="n_keywords" type="text" size="60" value="" /></td>
			</tr>
			<tr>
				<th>作者：</th>
				<td><input name="n_author" type="text" size="30" value="" /></td>
			</tr>
			<tr>
				<th>缩略图：</th>
				<td><input type="file" id="image1" name="n_pic" value="选择图片" /></td>
			</tr>
			<tr>
				<th>推荐位：</th>
				<td><input type="checkbox" name="isrecom" value="1" > 推荐 </td>
			</tr>
			<tr>
				<th>浏览次数：</th>
				<td><input type="text" name="n_hits" value="" size="6"></td>
			</tr>
			<tr>
				<th>信息内容：</th>
				<td>{!!csrf_field()!!}<script id="n_info" name="n_info" type="text/plain" style="width:1024px;height:500px;"></script></td>
			</tr>
			<tr>
				<th></th>
				<td><div class="buttons">
						<input type="submit" name="thevaluesubmit" value="提交保存" class="submit">
						<input type="hidden" name="a" value="<{$ac}>">
						<input type="hidden" name="id" value="<{$news.n_id}>">
						<input type="hidden" name="page" value="<{$page_g}>">
					</div></td>
			</tr>
		</table>
	</form>
</div>
<script>
	var ue = UE.getEditor('n_info');
</script>
</body>
</html>